/**
 *
 */

package com.moogene.saad.gameplay.city;

import com.moogene.android.InfoMediator;
import com.moogene.android.R;
import com.moogene.android.engine.mmi.ImageLayer;
import com.moogene.android.engine.mmi.Layer;
import com.moogene.saad.sns.Session;

/**
 * @author 28850924
 *
 */
public class CityListLayer extends Layer {

    // 5 cities one page
    public CityListLayer(int width, int height) {

        super(width, height);

        int halfWidth = width >> 1;
        int halfHeight = height >> 1;
        int quaterWidth = width >> 2;

        Layer cityBig = new ImageLayer(InfoMediator.getBitmap(R.drawable.city_big), halfWidth, height);
        Layer[] citySmalls = new Layer[] {
                new ImageLayer(InfoMediator.getBitmap(R.drawable.city_small), quaterWidth, halfHeight),
                new ImageLayer(InfoMediator.getBitmap(R.drawable.city_small), quaterWidth, halfHeight),
                new ImageLayer(InfoMediator.getBitmap(R.drawable.city_small), quaterWidth, halfHeight),
                new ImageLayer(InfoMediator.getBitmap(R.drawable.city_small), quaterWidth, halfHeight)
        };
        cityBig.setLocation(0, 0);
        citySmalls[0].setLocation(halfWidth, 0);
        citySmalls[1].setLocation(halfWidth + quaterWidth, 0);
        citySmalls[2].setLocation(halfWidth, halfHeight);
        citySmalls[3].setLocation(halfWidth + quaterWidth, halfHeight);
        addLayer(cityBig);
        addLayer(citySmalls[0]);
        addLayer(citySmalls[1]);
        addLayer(citySmalls[2]);
        addLayer(citySmalls[3]);
    }
}
